package priv.yiyuan.example.design.pay01;

/**
 * 支付适配器
 * <p>
 * 适配器类
 *
 * @author YiYuan
 * @data 2025/8/8
 * @apoNote
 */
public class PaymentAdapter implements PaymentStrategy {

    private ThirdPartyPayment partyPayment;

    private String account;

    public PaymentAdapter(ThirdPartyPayment partyPayment, String account) {
        this.partyPayment = partyPayment;
        this.account = account;
    }

    @Override
    public void pay(double amount) {
        partyPayment.makePayment(amount, account);
    }
}
